package com.itany.corejava.code06_面向对象.bms;

/**
 * @author MissChen
 * @date 2024年02月26日 11:04
 */
public class Parent {
}
interface Act{}
class Child extends Parent implements Act{

}
class Middle extends Parent{}
class Test{
    public static void main(String[] args) {
        Parent parent=new Child();
        Middle m=new Middle();
        Child c=new Child();
        System.out.println(parent instanceof  Parent);//true
        System.out.println(parent instanceof  Child);//true
        System.out.println(parent instanceof  Middle);//false
        System.out.println(c instanceof  Act);
    }
}